package com.beiding.natago2.utils;

/**
 * @author 丁常磊
 * @date 2021/9/18 11:00
 */

public class DataParser {
    public static String parse(byte[] data, String type) {
        try {
            if (type == null) {
                type = "string;utf8";
            }
            if (type.startsWith("string;")) {
                String cs = type.substring("string;".length());
                return new String(data, cs);
            }
        } catch (Exception e) {

        }
        return null;
    }
}
